package com.wwz.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.wwz.entity.PermissionPoint;
import com.wwz.entity.Result;
import com.wwz.service.IPermissionPointService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("permission/point")
@Api(tags = "Point权限控制器")
public class PermissionPointController {

    @Resource
    private IPermissionPointService permissionPointService;

    @GetMapping("list/{id}")
    @ApiOperation("Point列表")
    public Result getList(@PathVariable String id){
        return Result.ok( permissionPointService.list(Wrappers.<PermissionPoint>lambdaQuery()
                .eq(PermissionPoint::getId,id)));
    }
}


